<script setup lang="ts">
import { ref, withDefaults } from 'vue'
import { ElButton } from 'element-plus';

const count = ref(0)
interface Props {
  title?: string
}

const props = withDefaults(defineProps<Props>(), {
  title: '默认标题'
})
const testVal = defineModel('testVal', {
    type: String,
    default: 'hello'
})
</script>

<template>
    <div>
        <el-button @click="count++">按钮{{ count }}</el-button>
        <div>{{ props.title }}</div>
        <el-button @click="testVal = 'world'">改变值{{ testVal }}</el-button>
    </div>
</template>

<style scoped>

</style>